package rules;

import com.ruoyi.system.domain.vo.SysGasPointVO;

<#list SysGasPointVOList as item >
    <#if item.playItLow != -1>
        rule "gasPoint-${item.id}-${item.playItLow}"
            when
                $s : SysGasPointVO(av < ${item.playItLow} && ${item.lowAndLow} < av && databaseBitNumber == ${item.databaseBitNumber})
            then
                $s.setAlert(1);
                $s.setAlertType("低低报");
            update($s);
        end
    </#if>
    <#if item.lowQuota != -1>
        rule "gasPoint-${item.id}-${item.lowQuota}"
            when
                $s : SysGasPointVO(av < "${item.lowQuota}" && "${item.playItLow}" < av && databaseBitNumber == ${item.databaseBitNumber})
            then
                $s.setAlert(1);
                $s.setAlertType("低报");
            update($s);
        end
    </#if>
    <#if item.highQuota != -1>
        rule "gasPoint-${item.id}-${item.highQuota}"
            when
                $s : SysGasPointVO(av > ${item.highQuota} && databaseBitNumber == ${item.databaseBitNumber})
            then
                $s.setAlert(1);
                $s.setAlertType("高报");
            update($s);
        end
    </#if>
    <#if item.highAndMighty != -1>
        rule "gasPoint-${item.id}-${item.highAndMighty}"
            when
                $s : SysGasPointVO(av > ${item.highAndMighty} && databaseBitNumber == ${item.databaseBitNumber})
            then
                $s.setAlert(1);
                $s.setAlertType("高高报");
            update($s);
        end
    </#if>
</#list>
